<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>

</body>
<script>
  //获取信息
  new Promise((resolve, reject) => {

    try {
      setTimeout(() => {
        console.log(`请求数据`);
        const name = { name: `xiaoming` }
      })
    } catch (e) {
      console.log(e.message);
    }
  })
    .then((value) => {
      // console.log(value);
      setTimeout(() => {
        try {
          console.log(`请求年龄`);
          const age = { age: 18 }
          
        } catch (e) {
          console.log(e.message);
        }
      }, 20000);
    })
</script>

</html>